﻿<%@ Page Title="" Language="C#" MasterPageFile="Site1.Master" AutoEventWireup="true" CodeBehind="AwardUsers.aspx.cs" Inherits="RaceList.Admin.Relay.AwardUsers" %>
<%@ Import Namespace="RaceList.Admin.Relay" %>
<%@ Register Src="Paging.ascx" TagName="Paging" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MyContentPlaceHolder" runat="server">
    <script src="../scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>    
    <table width="100%">

        <tr width="100%">
            <td width="40%">获奖日期：
                <asp:TextBox ID="txtAwardStartDate" runat="server" onClick="WdatePicker({el:$dp.$('txtStartDate'),dateFmt:'yyyy-MM-dd'})"
                    Width="190" />
                -<asp:TextBox ID="txtAwardEndDate" runat="server" onClick="WdatePicker({el:$dp.$('txtEndDate'),dateFmt:'yyyy-MM-dd'})"
                    Width="190" />
            </td>
            <td width="40%">操作日期：
                <asp:TextBox ID="txtCheckStartDate" runat="server" onClick="WdatePicker({el:$dp.$('txtStartDate'),dateFmt:'yyyy-MM-dd'})"
                    Width="190" />
                -<asp:TextBox ID="txtCheckEndDate" runat="server" onClick="WdatePicker({el:$dp.$('txtEndDate'),dateFmt:'yyyy-MM-dd'})"
                    Width="190" />
            </td>
            <td>
                <asp:Button CssClass="btnCss" runat="server" ID="btnQuery" Text="查询" OnClick="btnQuery_Click"></asp:Button>&nbsp;
            </td>
        </tr>
    </table>
    <table width="100%">
        <tr width="100%">
            <td width="20%">
                <asp:Button CssClass="btnCss" runat="server" ID="btnRefresh" Text="刷新" OnClick="btnRefresh_Click"></asp:Button>&nbsp;
            </td>
            <td width="20%">                
                <asp:Button CssClass="btnCss" runat="server" ID="btnExport" Text="导出" OnClick="btnExport_Click"></asp:Button>&nbsp;
            </td>
            <td style="color: Red;" width="10%">
                <asp:Literal runat="server" ID="Message"></asp:Literal>
            </td>
            <td width="35%">奖品名称：
                <asp:DropDownList runat="server" ID="ddlAwardName" AutoPostBack="true" OnSelectedIndexChanged="ddlAwardName_SelectedIndexChanged"></asp:DropDownList>
            </td>
            <td width="35%">兑奖状态：
                <asp:DropDownList runat="server" ID="ddlIsCheck" AutoPostBack="true" OnSelectedIndexChanged="ddlIsCheck_SelectedIndexChanged"></asp:DropDownList>
            </td>
        </tr>
    </table>

    <div>
        <asp:GridView ID="gvList" CssClass="List" runat="server" AutoGenerateColumns="False" Width="100%"
            EmptyDataText="暂无中奖名单" OnRowCommand="gvList_RowCommand" OnRowDataBound="gvList_RowDataBound">
            <RowStyle Height="36px" />
            <Columns>
                <asp:TemplateField HeaderText="ID">
                    <HeaderStyle Width="36px" />
                    <ItemTemplate>
                        <%# Eval("Id") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="成绩">
                    <ItemTemplate>
                        <%#Eval("SumScore") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="名字">
                    <ItemTemplate>
                        <%#Eval("Name") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="手机">
                    <ItemTemplate>
                        <%#Eval("Phone") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="获奖时间">
                    <ItemTemplate>
                        <%# Eval("AddTime") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="赞助商">
                    <ItemTemplate>
                        <%# Eval("SponsorName") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="奖品名称">
                    <ItemTemplate>
                        <%# Eval("AwardName") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="是否兑奖">
                    <ItemTemplate>
                        <asp:LinkButton ID="CheckAward" runat="server" CommandName="CheckAward"
                            Text='<%# CommonHelp.CheckAward(Eval("IsCheck")) %>' CommandArgument='<%# Eval("Id") %>'></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="后台操作日期">
                    <ItemTemplate>
                        <%# Eval("CheckDate")==null?"":Eval("CheckDate").ToString() %>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <asp:Panel ID="LinkListPanel" runat="server" Width="100%">
            <uc1:Paging ID="Paging1" runat="server" />
            <asp:Button ID="btnPage" runat="server" Text="Button" Style="display: none;" UseSubmitBehavior="false" OnClick="btnPage_Click" />
        </asp:Panel>
    </div>
</asp:Content>
